/*
 * Street.h
 *
 *  Created on: 18/09/2011
 *      Author: godinho
 */

#ifndef STREET_H_
#define STREET_H_

#include <string>

class Street {

public:

	/**
	 * Constructor
	 *
	 * Build a street object that will be identified by streetName. All measured
	 * values are initiated with -1.
	 */
	Street(std::string streetName, int d);

	/**
	 *	Destructor
	 */
	virtual ~Street();


	/**
	 * Returns street flush direction, relative to controller.
	 *
	 * Values returned can be one of the following list:
	 *
	 * N:  0
	 * NE: 1
	 * E:  2
	 * SE: 3
	 * S:  4
	 * SW: 5
	 * W:  6
	 * NW: 7
	 *
	 * TODO represent two rand streets
	 */
    int getDirection() const;

    /**
     * Returns last measured car flush on street. This are a fuzzy value,
     * and can be:
     *
     * 0 - free
	 * 1 - light
	 * 2 - normal
	 * 3 - heavy
	 * 4 - congested
	 *
	 * If the value was not measured yet, this method returns -1
     */
    unsigned char getFlush() const;

    /**
     * Returns last measured car queue on this street.
     *
     * Queue is a fuzzy value, and can assume one of the values listed here:
     *
     * 0 - tiny
	 * 1 - small
	 * 3 - normal
	 * 4 - big
	 * 5 - huge
	 *
	 * If the value was not measured yet, this method returns -1
     */
    unsigned char getQueue() const;

    /**
     * String that identify this street
     */
    std::string getStreetName() const;

    /**
     * Street direction ( direction of cars on street) realtive to controller
     *
     * One of values defined on Directions enum
     */
    void setDirection(int direction);

    /**
     * Update last measured car flush on street. This are a fuzzy value,
     * and can be:
     *
     * 0 - free
	 * 1 - light
	 * 2 - normal
	 * 3 - heavy
	 * 4 - congested
     */
    void setFlush(unsigned char flush);

    /**
     * Update last measured car queue on this street.
     *
     * Queue is a fuzzy value, and can assume one of the values listed here:
     *
     * 0 - tiny
	 * 1 - small
	 * 3 - normal
	 * 4 - big
	 * 5 - huge
     */
    void setQueue(unsigned char queue);

private:
	/*
	 * Street name
	 */
	std::string mStreetName;

	/*
	 * Street direction
	 */
	int mDirection;

	/**
	 * TODO use enums
	 *
	 * Fuzzy value
	 *
	 * Allowed values for flush variable
	 *
	 * 0 - free
	 * 1 - light
	 * 2 - normal
	 * 3 - heavy
	 * 4 - congested
	 */
	unsigned char mFlush;

	/**
	 * TODO use enums
	 *
	 * Fuzzy value
	 *
	 * Allowed values for queue variable
	 *
	 * 0 - tiny
	 * 1 - small
	 * 3 - normal
	 * 4 - big
	 * 5 - huge
	 */
	unsigned char mQueue;

};


#endif /* STREET_H_ */
